import RentBeforeIndex from './rentBeforeIndex'
import RentBeforeList from './rentBeforeList'

const rentBeforeRouter = {

  path: 'landlord/rentBeforeIndex',
  getChildRoutes(location, cb) {
    require.ensure([], (require) => {
      cb(null, [
        {
          path: 'list',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, require('./rentBeforeList'))
            })
          },

        },
        {
          path: 'add',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, require('./rentBeforeAdd'))
            })
          }
        },
        {
          path: 'update',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, require('./rentBeforeModify'))
            })
          }
        },
        {
          path: 'recover',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, require('./rentBeforeRecover'))
            })
          }
        }
      ])
    })
  },

  indexRoute: {
    getComponents(location, cb) {
      require.ensure([], function (require) {
        cb(null, RentBeforeList)
      })
      return cb()
    }
  },

  getComponents(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, RentBeforeIndex)
    })
  }
}

export default rentBeforeRouter;

